'''
author: leiwenhui
date: 2020年10月22日
version：v1
file_name: user login verify
'''

username_temp = 'admin'
password_temp = '123456'
try_time = 3
for i in range(try_time):
    username = input("Please input username:")
    password = input("Please input password:")
    if username == username_temp and password == password_temp:
        print('User login successfully.')
        break
    elif i == (try_time - 1): # 这里的判断，可以用for...else实现
        print('Error, end...')
        break
    else:
        print('Error, please try again.')
